-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add container azure metricset #16421
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. I see the metrics are very similar to what the Kubernetes module provides. I see this relation as the same we have between Compute metricset and System module
# client_secret: '${AZURE_CLIENT_SECRET:""}' | ||
# tenant_id: '${AZURE_TENANT_ID:""}' | ||
# subscription_id: '${AZURE_SUBSCRIPTION_ID:""}' | ||
# refresh_list_interval: 600s |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This file is starting to grow a lot. Would it make sense to group all metricsets that share the same params? This can happen on a different PR
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could do, will add this to the new PR
clientId, ok := os.LookupEnv("AZURE_CLIENT_ID") | ||
if !ok { | ||
return nil, errors.New("missing AZURE_CLIENT_ID key") | ||
} | ||
clientSecret, ok := os.LookupEnv("AZURE_CLIENT_SECRET") | ||
if !ok { | ||
return nil, errors.New("missing AZURE_CLIENT_SECRET key") | ||
} | ||
tenantId, ok := os.LookupEnv("AZURE_TENANT_ID") | ||
if !ok { | ||
return nil, errors.New("missing AZURE_TENANT_ID key") | ||
} | ||
subscriptionId, ok := os.LookupEnv("AZURE_SUBSCRIPTION_ID") | ||
if !ok { | ||
return nil, errors.New("missing AZURE_SUBSCRIPTION_ID key") | ||
} | ||
config := map[string]interface{}{ | ||
"module": "azure", | ||
"metricsets": []string{"container_instance"}, | ||
"client_id": clientId, | ||
"client_secret": clientSecret, | ||
"tenant_id": tenantId, | ||
"subscription_id": subscriptionId, | ||
} | ||
return config, nil |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems like there is an opportunity for having some shared code doing this across the board
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that will come with #16754
* add container * update changelog * fix test * separate container * separate * regenerate * fixes * tests * fix test (cherry picked from commit d89675f)
should solve #15751
Added
container_service
,container_instance
andcontainer_registry
metricsets:Config:
extra config options as in the other metricsets: